package day14;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;

public class homework005 {
    public static void main(String[] args) throws Exception {
        int sums=0;
        ExecutorService es = Executors.newFixedThreadPool(10);
        for(int i=1;i<=10;i++){
            homework05 h=new homework05(i*10,(i-1)*10);
            Future<Integer> ft= es.submit(h);
            int num=ft.get();
            sums+=num;
        }
        System.out.println(sums);
        es.shutdown();
    }
}
